package cn.iocoder.yudao.module.member.service.banner;

import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.member.dal.dataobject.banner.AppBannerDO;
import cn.iocoder.yudao.module.member.dal.mysql.banner.AppBannerMapper;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;

import java.util.List;

import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;

/**
 * 轮播图 Service 实现类
 *
 * @author 理疗系统
 */
@Service
@Validated
public class AppBannerServiceImpl implements AppBannerService {

    @Resource
    private AppBannerMapper appBannerMapper;

    @Override
    public List<AppBannerDO> getBannerList() {
        return appBannerMapper.selectList(new LambdaQueryWrapperX<AppBannerDO>().orderByDesc(AppBannerDO::getSort));
    }
}
